	
		<?php for($i=1;$i<=$data->quantity_object;$i++) {?>
			
		<?php $at = $data->getAnswerThread1($data->ID,$i)?>	
		<tr class="odd">
		
		  <td style="width: 10%; text-align: center;">
		  	<a href="<?php echo Yii::app()->baseUrl."/admin/issue/view/id/".$data->ID?>"><?php echo $data->ID?></a>
		  </td>
		
			<td style="width: 10%; text-align: center;">
				<a href="<?php echo Yii::app()->baseUrl."/admin/answer/view/id/".$at['ID']?>">Câu <?php echo $i?></a>
			</td>
		
			<?php						
					$resolve_status = $data->getStatus('answer', $at['ID'],'resolve_status');				 
			?>
			
			<td style="width: 25%; text-align: center;"><?php echo $resolve_status?></td>			
			
			<td style="width: 15%; text-align: center;"
				id="countdown_<?php echo $at['ID'] ?>_<?php echo $at['issueID']?>" class="countdown">
				<?php echo ($at['expire_resolve_time']-time())>=0?($at['expire_resolve_time']-time()):"<button class='disabled btn btn-warning'><i class='icon-time icon-white'></i> Hết giờ</button>"?>				
			</td>						
			
			<td style="width: 20%; text-align: center;">
				<?php if($at['resolver']!=0){?>
					<?php echo User::model()->getUserName($at['resolver'])?>
				<?php } else {?>
					<?php 
						/*echo CHtml::dropDownList('listEditor', '', $data->getUsers(3),array('id'=>'issue_'.$data->ID.'_'.$i))*/
						echo "---/---" 
					 ?>
				<?php }?>
			</td>	
			
			<!-- Action for checker to view/assign/reassign/assign to other/confirm -->
			<td >
				<div class="btn-group" style="margin-left:50px;" >
					<button class="btn btn-info dropdown-toggle" data-toggle="dropdown">Chọn action<span class="caret"></span></button>
          	<ul class="dropdown-menu">
          		<li>
	            	<a 	href="javascript: showPopup('<?php echo Yii::app()->baseUrl?>/admin/answer/view/id/<?php echo $at['ID']?>',800,600)" id="view_<?php echo $data->ID.'_'.$at['thread_number']?>">
											<i class="icon-eye-open" ></i> Xem bài giải
								</a>
							</li>
          	<!-- Not assigned -->
          	<?php if($resolve_status=='NOTASSIGNED'){?>
          		<li>
	            	<a href="javascript: showPopup('<?php echo Yii::app()->baseUrl?>/admin/answer/assign/id/<?php echo $at['ID']?>',800,600)" id="view_<?php echo $data->ID.'_'.$at['thread_number']?>">
											<i class="icon-hand-right" ></i> Phân công cho resolver
								</a>
							</li>
          	<!-- assigned -->
          	<?php } else if($resolve_status=='ASSIGNED'){?>
          	
          	<!-- resolved -->
          	<?php } else if($resolve_status=='RESOLVED'){?>
	          	<li>		            
									<a id="confirm_<?php echo $data->ID.'_'.$i?>"  onclick="beforeAssign(<?php echo $at['resolver']?>,<?php echo $data->ID?>,<?php echo $i?>,'confirm')">
												<i class=" icon-thumbs-up" ></i> Xác nhận
									</a>
							</li>
							<li>
		            	<a id="reassign_<?php echo $data->ID.'_'.$i?>"  onclick="beforeAssign(<?php echo $at['resolver']?>,<?php echo $data->ID?>,<?php echo $i?>,'reassign')">
												<i class=" icon-thumbs-down" ></i> Yêu cầu giải lại
									</a>
							</li>
							<li>
		            	<a href="javascript: showPopup('<?php echo Yii::app()->baseUrl?>/admin/answer/assignother/id/<?php echo $at['ID']?>',800,600)" id="view_<?php echo $data->ID.'_'.$at['thread_number']?>">
												<i class=" icon-hand-down" ></i> Phân công resolver khác
									</a>
							</li>
          	<?php } else { ?>
          	
          	<?php }?>      	
            </ul>
        </div>		
			</td>
		</tr>
		
		<?php }?>


